﻿using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Threading.Tasks;
using Xms.Abp.AspNetCore.Mvc;

namespace BackgroundJobManagement;

[Route("api/management/background/schedules")]
[SwaggerTag("执行计划管理")]
public class BackgroundScheduleController : XmsCrudController<IBackgroundScheduleAppService, BackgroundScheduleResult, Guid, BackgroundSchedulesPagedParameter, BackgroundScheduleCreateParameter, BackgroundScheduleUpdateParameter>, IBackgroundScheduleAppService
{
    [HttpPost]
    [Route("{id}/restart")]
    public async Task ExecuteAsync(Guid id)
        => await CurrentService.ExecuteAsync(id);
}
